package com.hzxy.yiyid.web.module.repository;

import com.hzxy.yiyid.web.module.repository.entity.MedicareDrugDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MedicareDrugDoRepository extends JpaSpecificationExecutor<MedicareDrugDo>
        , JpaRepository<MedicareDrugDo, Long> {
    @Query("from MedicareDrugDo where tym =:tym")
    List<MedicareDrugDo> findByTym(@Param("tym") String tym);

    @Query("from MedicareDrugDo where spm =:spm")
    List<MedicareDrugDo> findBySpm(@Param("spm") String spm);
}
